package com.xiaxiaoge.tutorialmod.entity.client;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.xiaxiaoge.tutorialmod.TutorialMod;
import com.xiaxiaoge.tutorialmod.entity.custom.VictoriousSwiftTwoEntity;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer;

/**
 * @author 夏小哥
 * @version 1.0
 * 渲染器
 */
public class VictoriousSwiftTwoRenderer extends GeoEntityRenderer<VictoriousSwiftTwoEntity> {
    public VictoriousSwiftTwoRenderer(EntityRendererProvider.Context renderManager) {
        super(renderManager, new VictoriousSwiftTwoModel());
        this.shadowRadius = 0.3f;
    }

    @Override
    public ResourceLocation getTextureLocation(VictoriousSwiftTwoEntity instance) {
        return new ResourceLocation(TutorialMod.MOD_ID, "textures/entity/victorious_swift_two_texture.png");
    }

    @Override
    public RenderType getRenderType(VictoriousSwiftTwoEntity animatable, float partialTicks, PoseStack stack,
                                    @Nullable MultiBufferSource renderTypeBuffer,
                                    @Nullable VertexConsumer vertexBuilder, int packedLightIn,
                                    ResourceLocation textureLocation) {
        stack.scale(15f, 15f, 15f);
        return super.getRenderType(animatable, partialTicks, stack, renderTypeBuffer, vertexBuilder, packedLightIn, textureLocation);
    }
}
